package com.dem01;

/**
 * @program: fanxing
 * @description:
 * @author: 诸葛龙辰
 * @create: 2022-10-25 19:03
 **/
public class Test01 {
    public static void main(String[] args) {
        //整型
        Point p1 = new Point(15,16);
        System.out.println(p1);
        //小数
        Point p2 = new Point(11.1,12.2);
        System.out.println(p2);
        //字符串
        Point p3 = new Point("东20度","北55度");
        System.out.println(p3);
        //属性可以设置字符串和整形--不符合题要求
        Point p4 = new Point("东经23度",25);
       String x = (String) p4.getX();
       //数据类型安全问题
        String y = (String) p4.getY();
        System.out.println(p4);


    }
}
